<template>
    <el-tag size="mini" :type="tagType">{{ paramValue }}</el-tag>
</template>
<script>
import { getDictByLabel } from '@/utils'
export default {
  name: 'Cellsdict',
  data () {
    return {
      paramValue: "",
	  tagType: ""
    }
  },
  mounted() {
  	   this.paramValues()
  },
  props: {
	value: [Number, String],
	paramKey: String,
	paramCode: String,
	paramType: String
  },
  watch: {
	   paramKey(newVal){
		   this.paramValues()
	   }
	},
  methods:{
	  paramValues(){
		  this.paramValue =  getDictByLabel(this.paramCode,this.paramKey,this.paramType).paramKey;
		  this.tagType =  getDictByLabel(this.paramCode,this.paramKey,this.paramType).tagType;
		  console.log("this tagType is " + this.tagType)
	  }
  }
}
</script>
